SetAxisMotionProfile
配置軸的運動設定。
語法
KsError SetAxisMotionProfile(
int Index,
McProfileType ProfileType,
McProfileSettings Settings
);
參數
Index:軸的索引。索引以零為起點;別名將影響此參數。
ProfileType:確定加速度、減速度和加加速度的單位,請見 McProfileType 類型。
Settings:調整軸的運動設定,請見 McProfileSettings 結構。
回傳值
如果此函式執行成功,會回傳 errNoError
,否則會傳回錯誤碼。如需更多有關錯誤碼的資訊,請參閱 KsError 清單。
範例
複製
McProfileSettings Motion = {
3, //MINIMUM_ERROR
360, //MAXIMUM_ERROR
3600, //MAXIMUM_VELOCITY
36000, //MAXIMUM_ACCELERATION
36000, //MAXIMUM_DECELERATION
3600000, //MAXIMUM_JERK
0 //MAXIMUM_JOLT
};
KsError nRet = SetAxisMotionProfile(0, McProfileType::profileUnitPerSecond, Motion);
使用需求
RT | Win32 | |
---|---|---|
最低支援版本 | 4.0 | 4.0 |
標頭檔 | ksmotion.h | ksmotion.h |
程式庫 | KsApi_Rtss.lib | KsApi.lib |
參見